﻿@model IEnumerable<KCMS.Web.Models.MenuItemViewModel>
@foreach (var item in Model)
{
    if (item.Published.Equals(true))
    {
    <li @if (item.HtmlClass != null)
        {
                <text>class="@item.HtmlClass"</text>
        }
            @if (item.HtmlId != null)
            {
                <text>id="@item.HtmlId"</text>
            }
                >
        @{ Html.RenderAction("Show", "MenuItem", new { item = item });}
        @if (item.Items.Count() != 0)
        {
            <ul>
                @{ Html.RenderPartial("_MenuItems", item.Items); }
            </ul>
        }
    </li>        
    }
}
